<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>试卷</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f4f4f4;
            margin: 0;
            padding: 20px;
        }
        .container {
            max-width: 800px;
            margin: 0 auto;
            background-color: #fff;
            padding: 20px;
            border-radius: 5px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }
        h1 {
            text-align: center;
            color: #333;
        }
        .question {
            margin-bottom: 20px;
        }
        .question h2 {
            font-size: 18px;
            margin-bottom: 10px;
        }
        .question ul {
            list-style-type: none;
            padding: 0;
        }
        .question ul li {
            margin-bottom: 10px;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>{{ exam_name }} 试卷</h1>

        <h2>选择题</h2>
        {% for q in exam['choices'] %}
        <div class="question">
            <h2>{{ q[2] }}</h2> <!-- 题目 -->
            <ul>
                <li>A. {{ q[3] }}</li> <!-- 选项 A -->
                <li>B. {{ q[4] }}</li> <!-- 选项 B -->
                <li>C. {{ q[5] }}</li> <!-- 选项 C -->
                <li>D. {{ q[6] }}</li> <!-- 选项 D -->
            </ul>
            <p>正确答案: {{ q[7] }}</p> <!-- 正确答案 -->
        </div>
        {% endfor %}

        <h2>判断题</h2>
        {% for q in exam['true_false'] %}
        <div class="question">
            <h2>{{ q[2] }}</h2> <!-- 题目 -->
            <p>正确答案: {{ q[3] }}</p> <!-- 正确答案 -->
        </div>
        {% endfor %}

        <h2>主观题</h2>
        {% for q in exam['subjective'] %}
        <div class="question">
            <h2>{{ q[2] }}</h2> <!-- 题目 -->
            <p>答案示例: {{ q[3] }}</p> <!-- 示例答案 -->
        </div>
        {% endfor %}
    </div>
</body>
</html>
